#ifndef _SPI_PROTOCOL_H_
#define _SPI_PROTOCOL_H_

#include "SoftwareSpi.h"
#include "../Protocol.h"

class SpiProtocol : Protocol
{
	private : 
		SoftwareSpi spi;
		Queue<unsigned char> input;
		Queue<unsigned char> output;
	public:

		SpiProtocol(SoftwareSpi& s);
		virtual void writeByte(unsigned char data);
		virtual void write(void* data, unsigned long int length);
		virtual unsigned char readByte();

		virtual void* read(unsigned long int length);
		virtual unsigned char full();
		virtual unsigned char empty();
		virtual void config();
		virtual void run();
		
		
};

#endif
